\subsection{Definition and basic theorems}
We construct the complex numbers from \(\mathbb R\) by adding an element \(i\) such that \(i^2 = -1\).
By definition, any complex number \(z \in \mathbb C = x + iy\) where \(x, y \in \mathbb R\).
We use the notation \(x = \Re z\) and \(y = \Im z\) to query the components of a complex number.
The complex numbers contains the set of real numbers, due to the fact that \(x = x + i0\).
We define the operations of addition and multiplication in familiar ways, which lets us state that \(\mathbb C\) is a field.

We also define the complex conjugate \(\overline{z}\) as negating the imaginary part of \(z\).
Trivially we can see facts such as \(\overline{\left( \overline{z}\right) } = z\); \(\overline{z + w} = \overline z + \overline w\) and \(\overline{zw} = \overline z \cdot \overline w\).

The Fundamental Theorem of Algebra states that a polynomial of degree \(n\) can be written as a product of \(n\) linear factors:
\[
	c_n z^n + \cdots + c_1z^1 + c_0z^0 = c_n(z-\alpha_1)(z-\alpha_2) \cdots (z-\alpha_n)\quad (\text{where } c_i, \alpha_i \in \mathbb C)
\]

We can reformulate this statement as follows: a polynomial of degree \(n\) has \(n\) solutions \(\alpha_i\), counting repeats.
This theorem is not proved in this course.

The modulus of complex numbers \(z_1, z_2\) satisfies:
\begin{itemize}
	\item (composition) \(\abs{z_1 z_2} = \abs{z_1} \abs{z_2}\), and
	\item (triangle inequality) \(\abs{z_1 + z_2} \leq \abs{z_1} + \abs{z_2}\)
\end{itemize}
\begin{proof}
	The composition property is trivial.
	To prove the triangle inequality, we square both sides and compare.
	\begin{align*}
		\text{LHS} & = \abs{z_1 + z_2}^2                                                 \\
		           & = (z_1 + z_2)\overline{(z_1 + z_2)}                                 \\
		           & = \abs{z_1}^2 + \overline{z_1}z_2 + z_1\overline{z_2} + \abs{z_2}^2 \\
		\text{RHS} & = \abs{z_1}^2 + 2 \abs{z_1}\abs{z_2} + \abs{z_2}^2
	\end{align*}
	Note that
	\begin{align*}
		\overline{z_1}z_2 + z_1\overline{z_2}                                           & \leq 2 \abs{z_1}\abs{z_2}     \\
		\iff \frac{1}{2}\left( \overline{z_1}z_2 + \overline{\overline{z_1}z_2} \right) & \leq \abs{z_1}\abs{z_2}       \\
		\iff \Re (\overline{z_1} z_2)                                                   & \leq \abs{\overline{z_1} z_2}
	\end{align*}
	which is true.
\end{proof}

We can alternatively use the map \(z_2 \to z_2 - z_1\) to write the triangle inequality as
\begin{align*}
	\abs{z_2 - z_1}            & \geq \abs{z_2} - \abs{z_1}       \\
	\text{or } \abs{z_2 - z_1} & \geq \abs{z_1} - \abs{z_2}       \\
	\therefore\ \abs{z_2 - z_1} & \geq \abs{\abs{z_2} - \abs{z_1}} \\
\end{align*}

De Moivre's Theorem states that
\[
	(\cos \theta + i \sin \theta)^n = \cos n \theta + i \sin n \theta \quad(\forall n \in \mathbb Z)
\]
We can prove this using induction for \(n \geq 0\).
To show the negative case, simply use the positive result and raise it to the power of \(-1\).

\subsection{Complex valued functions}
For \(z \in \mathbb C\), we can define:
\begin{align*}
	\exp z & = \sum_{n=0}^{\infty} \frac{1}{n!}z^n          \\
	\cos z & = \frac{1}{2} \left( e^{iz} + e^{-iz} \right)  \\
	\sin z & = \frac{1}{2i} \left( e^{iz} - e^{-iz} \right)
\end{align*}
By defining \(\log z = w \st e^w = z\), we have a complex logarithm function.
By expanding the definition, we get that \(\log z = \log r + i\theta\) where \(r = \abs{z}\) and \(\theta = \arg{z}\).
Note that because the argument of a complex number is multi-valued, so is the logarithm.

We can define exponentiation in the general case by defining \(z^\alpha = e^{\alpha \log z}\).
Depending on the choice of \(\alpha\), we have three cases:
\begin{itemize}
	\item If \(\alpha = p \in \mathbb Z\) then the result of \(z^p\) is unambiguous because
	      \[
		      z^p = e^{p \log z} = e^{p (\log r + i \theta + 2 \pi i n)}
	      \]
	      which has a factor of \(e^{2 \pi i p n}\) which is 1.
	\item For a similar reason, a rational exponent has finitely many values.
	\item But in the general case, there are infinitely many values.
\end{itemize}
We can calculate results such as the square root of a complex number, which have two results as you might expect.

\begin{note}
	We can't use facts like \(z^\alpha z^\beta = z^{\alpha + \beta}\) in the complex case because the left and right hand sides both have infinite sets of answers, which may not be the same.
\end{note}

\subsection{Transformations and primitives}
We can represent a line passing through \(x_0\in \mathbb C\) parallel to \(w \in \mathbb C\) using the formula:
\[
	z = z_0 + \lambda w\quad(\lambda \in \mathbb R)
\]
We can eliminate the dependency on \(\lambda\) by computing the conjugate of both sides:
\begin{align*}
	\overline{z}                  & = \overline{z_0} + \lambda \overline{w} \\
	\overline{w}z - w\overline{z} & = \overline{w}z_0 - w\overline{z_0}
\end{align*}
We can also write the equation for a circle with centre \(c \in \mathbb C\) and radius \(\rho \in \mathbb R\):
\[
	z = c + \rho e^{i\alpha}
\]
or equivalently:
\[
	\abs{z - c} = \abs{\rho e^{i\alpha}} = \rho
\]
or by squaring both sides:
\[
	\abs{z}^2 - c\overline{z} - \overline{c}z = \rho^2 - \abs{c}^2
\]
